package com.example.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudentController {
    @Autowired
    StudentServer studentServer;

    @GetMapping("/student")
    public String student(@RequestParam Integer num) {
        Student student = studentServer.findStudent(num);
        return student.toString();
    }
}
